﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication8
{
    public partial class donhua : Form
    {
        public donhua()
        {
            InitializeComponent();
        }

        private void donhua_Load(object sender, EventArgs e)
        {
            pbar.Value = 0;
            pbar.Maximum = 100;
            pbar.Minimum = 0;//设置进度栏的最小值为0
            pbar.Font = Font;
            pbar.Text = "0%";
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (pbar.Value >= pbar.Maximum)
            {
                this.Hide();
                timer1.Stop();
                timer1.Start();
                yonghu aa = new yonghu();
                aa.Show();

                timer1.Stop();
            }
            else
            {
                pbar.Value = pbar.Value + 2;
                pbar.Text = ((float)((float)pbar.Value / (float)pbar.Maximum) * 100).ToString() + "%";

            }
            label_JZ.Text = "正在加载，请稍后..." + pbar.Value + "%";
        }
    }
}
